// 创建问题模板
function getRightShowHtml(b) {
    var a = "";
    if (b.showtype == "page") { // 创建分页
        a += getRightPage(b);
    } else {
        a += getRightQuestion(b); // 创建普通问题
    }
    return a;
}

// 对问题复制、删除的模板
function getRightActionHtml(b) {
    var a = "";
    a += '<div class="fieldActions">';
    a += '<img class="faDup" id="q_copyquestion_' + b.id + '" src="' + imagePath + 'copy_16.gif" alt="复制" title="复制" />';
    a += '<img class="faDup" id="q_deletequestion_' + b.id + '" src="' + imagePath + 'delete.gif" alt="删除" title="删除" />';
    a += "</div>";
    a += '<div class="cover-layer" style="top:0px;"><a href="javascript:void(0);" onclick="return false;"><img id="coverlayer_' + b.id + '" height="190" width="603" src="' + imagePath + 'space.gif"></a></div>';
    return a
}

// 创建分页模板
function getRightPage(b) {
    var a = "";
    a += '<li id="question_' + b.id + '" class="notranslate dragable" onclick="showLeftQuestion(\'' + b.id + "')\" onmouseover=\"showLeftQuestionMouseOver('" + b.id + "')\"   onmouseout=\"showLeftQuestionMouseOut('" + b.id + '\')" title="点击编辑分页符，拖动调整问题排序" style="margin-bottom:20px;">';
    a += '<img src="' + imagePath + 'arrow.png" alt="" class="arrow">';
    a += "<div>";
    a += '<div class="page-break">';
    a += '<div class="t-center" id="q_buttontype_' + b.id + '">';
    a += getRightPageButtonInnerHtml(b);
    a += "<div></div>";
    a += "</div>";
    a += "</div>";
    a += '<div class="th-pagesort">';
    if (b.type == 1) {
        a += '<span class="text-jiandao">创建逻辑后的自动分页</span>'
    }
    a += '<span><img width="17" height="14" src="' + imagePath + 'jiandao_pic.gif"></span>';
    a += "</div>";
    a += "</div>";
    a += getRightActionHtml(b);
    a += "</li>";
    return a
}

// 分页具体模板
function getRightPageButtonInnerHtml(b) {
    var a = "";
    if (survey.buttontype == 0) {
        a += '<input type="submit" class="btTxt submit hasnext" value="上一页"><input type="submit" class="btTxt submit hasnext" value="下一页">'
    } else {
        a += '<a title="上一页" ><img width="23" height="19" alt="上一页" src="' + imagePath + 'prev_btn.gif"></a><a class="ml10" title="下一页" ><img width="23" height="19" alt="下一页" src="' + imagePath + 'next_btn.gif"></a>'
    }
    return a
}

// 创建问题模板
function getRightQuestion(b) {
    var a = "";
    var d = "问题";
    var c = "";
    if (b.typeid == 1 && b.type == 0) {
        c += " section";
        d = "分节符"
    }
    a += '<li id="question_' + b.id + '" class="notranslate dragable ' + c + '" onclick="showLeftQuestion(\'' + b.id + "')\" onmouseover=\"showLeftQuestionMouseOver('" + b.id + "')\"   onmouseout=\"showLeftQuestionMouseOut('" + b.id + '\')" title="点击编辑' + d + '，拖动调整问题排序" style="margin-bottom:20px;" >';
    a += getRightQuestionInnerHtml(b);
    a += "</li>";
    return a
}

// 问题具体内容
function getRightQuestionInnerHtml(b) {
    var a = "";
    a += '<img src="' + imagePath + 'arrow.png" alt="" class="arrow">';
    a += "<fieldset>";
    if (b.typeid == 1 && (b.type == 1 || b.type == 2)) {
        a += getSingleHtml(b)
    } else {
        if (b.typeid == 1 && (b.type == 41 || b.type == 42)) {
            a += getGridHtml(b)
        } else {
            if (b.typeid == 1 && b.type == 6) {
                a += getOpenHtml(b)
            } else {
                if (b.typeid == 5 && b.type == 6) {
                    a += getSingleOpenHtml(b)
                } else {
                    if (b.typeid == 1 && b.type == 0) {
                        a += getBlankHtml(b)
                    } else {
                        if (b.typeid == 18 && b.type == 1) {
                            a += getScoreHtml(b)
                        } else {
                            if (b.typeid == 3) {
                                a += getColorHtml(b)
                            } else {
                                if (b.typeid == 15 && b.type == 1) {
                                    a += getAgeHtml(b)
                                } else {
                                    if (b.typeid == 16 && b.type == 1) {
                                        a += getSexHtml(b)
                                    } else {
                                        if (b.typeid == 17 && b.type == 1) {
                                            a += getCityHtml(b)
                                        } else {
                                            if (b.typeid == 11 && b.type == 6) {
                                                a += getEmailHtml(b)
                                            } else {
                                                if (b.typeid == 14 && b.type == 6) {
                                                    a += getWebsiteHtml(b)
                                                } else {
                                                    if (b.typeid == 7 && b.type == 6) {
                                                        a += getNameHtml(b)
                                                    } else {
                                                        if (b.typeid == 9 && b.type == 6) {
                                                            a += getDateHtml(b)
                                                        } else {
                                                            if (b.typeid == 10 && b.type == 6) {
                                                                a += getTimeHtml(b)
                                                            } else {
                                                                if (b.typeid == 13 && b.type == 6) {
                                                                    a += getPriceHtml(b)
                                                                } else {
                                                                    if (b.typeid == 12 && b.type == 6) {
                                                                        a += getPhoneHtml(b)
                                                                    } else {
                                                                        if (b.typeid == 8 && b.type == 6) {
                                                                            a += getAddressHtml(b)
                                                                        } else {
                                                                            a += ""
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    a += "</fieldset>";
    a += getRightActionHtml(b);
    return a
}

// 单选题模板
function getSingleHtml(c) {
    var b = "";
    b += getNameForLegendHtml(c);
    var a = "";
    if (c.format == 9) {
        a = "twoColumns"
    } else {
        if (c.format == 10) {
            a = "threeColumns"
        } else {
            if (c.format == 11) {
                a = "notStacked"
            } else {
                if (c.format == 12) {
                    a = "radio-select"
                }
            }
        }
    }
    b += '<div id="q_answers_' + c.id + '" class="' + a + '">';
    b += getQuestionAnswerHtml(c);
    b += "</div>";
    return b
}
function getQuestionAnswerHtml(a) {
    if (a.type == 1 || a.type == 2) {
        if (a.format == QuestionFormat.select.format) {
            return getSelectAnswerHtml(a)
        } else {
            return getSingleAnswerHtml(a)
        }
    } else {
        return getGridAnswerHtml(a)
    }
}
function getSelectAnswerHtml(e) {
    var d = "";
    d += '<p><select  name="q_answercheckbox_' + e.id + '" value="1" tabindex="1" class="ra-se">';
    d += "<option>请选择</option>";
    for (var c = 0; c < e.answers.length; c++) {
        var b = e.answers[c];
        d += "<option>" + replaceQuestion(b.name) + "</option>"
    }
    d += "</select></p>";
    return d
}
function getSingleAnswerHtml(e) {
    var d = "";
    for (var c = 0; c < e.answers.length; c++) {
        var b = e.answers[c];
        d += '<div id="q_singleanswer_' + e.id + "_" + b.id + '" class="columns">';
        d += '<div class="q-choice">';
        d += '<input type="' + (e.type == 1 ? "radio": "checkbox") + '" id="q_answercheckbox_' + e.id + "_" + b.id + '" name="q_answercheckbox_' + e.id + '" value="1" tabindex="1" />';
        d += "</div>";
        d += '<div id="q_answer_' + e.id + "_" + b.id + '" class="q-cont">';
        d += getSingleAnswerInnerHtml(b);
        d += "</div>";
        d += '<div class="clear"></div>';
        d += "</div>"
    }
    return d
}
function getSingleAnswerInnerHtml(c) {
    var d = "";
    if (c.imageurl != null && c.imageurl != "") {
        var b = "";
        var f = "";
        var e = "";
        if (c.imageurl != null && c.imageurl != "") {
            if (c.imagetype == 1) {
                f = "<span>";
                e = "</span>";
                b = 'class="img90"'
            } else {
                if (c.imagetype == 2) {
                    b = 'class="img-fit"'
                } else {
                    if (c.imagetype == 3) {
                        b = ""
                    } else {
                        b = 'width="' + c.imagewidth + '" height="' + c.imageheight + '"'
                    }
                }
            }
        }
        d += '<div class="pic-choice">';
        d += f;
        d += '<img id="q_answerimgurl_' + c.id + '" ' + b + ' src="' + getImageUrl(c.imageurl) + '">';
        d += e;
        d += "</div>"
    }
    if (c.name != null && c.name != "" || c.hasother == 1) {
        if (c.name != null && c.name != "") {
            d += '<em class="mr5">' + replaceQuestion(c.name) + "</em>"
        }
        if (c.hasother == 1) {
            d += '<input type="text" style="width:100px;">'
        }
    }
    return d
}
function getNameForLegendHtml(b) {
    var a = "";
    a += '<div class="ques-tit">';
    a += '<div class="q-num" id="q_no_' + b.id + '"></div>';
    a += '<div class="q-problems">';
    a += '<div class="q-cont-txt" id="q_name_' + b.id + '">' + replaceQuestion(b.descriptionview) + "</div>";
    a += getImgHtml(b);
    a += "</div>";
    a += '<div class="clear"></div>';
    a += "</div>";
    return a
}
function getNameForLabelHtml(a) {
    return getNameForLegendHtml(a)
}
function getImgHtml(c) {
    var a = "";
    var b = "";
    if (c.imageurl != null && c.imageurl != "") {
        b = ""
    } else {
        b = 'style="display:none;"'
    }
    a += '<div id="q_img_' + c.id + '" class="titpic" ' + b + ">";
    a += getImgInnerHtml(c);
    a += "</div>";
    return a
}
function getImgInnerHtml(d) {
    var b = "";
    var e = "";
    var c = "";
    var a = "";
    if (d.imageurl != null && d.imageurl != "") {
        if (d.imagetype == 1) {
            e = "<span>";
            c = "</span>";
            a = 'class="img150"'
        } else {
            if (d.imagetype == 2) {
                a = 'class="img-fit"'
            } else {
                if (d.imagetype == 3) {
                    a = ""
                } else {
                    a = 'width="' + d.imagewidth + '" height="' + d.imageheight + '"'
                }
            }
        }
    }
    b += e + '<img id="q_imgurl_' + d.id + '" ' + a + ' src="' + getImageUrl(d.imageurl) + '" />' + c;
    return b
}
function getGridHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += '<div class="mq-q-question" id="q_answers_' + b.id + '">';
    a += getQuestionAnswerHtml(b);
    a += "</div>";
    return a
}
function getGridAnswerHtml(b) {
    var l = 20;
    var g = "";
    g += '<table width="100%" cellspacing="0" cellpadding="4"><tbody>';
    g += '<tr><td class="trStit" width="' + l + '%">&nbsp;</td>';
    var d = Math.round((100 - l) / b.answers.length * 100) / 100;
    for (var f = 0; f < b.answers.length; f++) {
        var k = b.answers[f];
        g += '<td align="center" class="trStit" id="q_answer_' + b.id + "_" + k.id + '" width="' + d + '%">' + replaceQuestion(k.name) + "</td>"
    }
    g += "</tr>";
    for (var f = 0; f < b.questions.length; f++) {
        var h = b.questions[f];
        var c = "trS2";
        if ((f % 2) == 1) {
            c = "trS3"
        }
        g += '<tr class="' + c + '"><td id="q_question_' + b.id + "_" + h.id + '">' + replaceQuestion(h.descriptionview) + "</td>";
        for (var e = 0; e < b.answers.length; e++) {
            g += '<td align="center"><input type="' + (b.type == 41 ? "radio": "checkbox") + '" id="q_answercheckbox_' + b.id + "_" + k.id + '" name="q_answercheckbox_' + h.id + '"></td>'
        }
        g += "</tr>"
    }
    g += "</tbody></table>";
    return g
}
function getOpenHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<div class="handle"></div>';
    a += '<textarea id="q_format_' + b.id + '"  class="field textarea ' + (b.format == 1 ? "small": (b.format == 2 ? "medium": "large")) + '" spellcheck="true" rows="10" cols="50" tabindex="1" readonly="readonly"></textarea>';
    a += "";
    a += "</div>";
    return a
}
function getSingleOpenHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += '<div id="q_answers_' + b.id + '">';
    a += getSingleOpenAnswerHtml(b);
    a += "</div>";
    return a
}
function getSingleOpenAnswerHtml(e) {
    var d = "";
    for (var c = 0; c < e.answers.length; c++) {
        var b = e.answers[c];
        d += '<div id="q_answer_' + e.id + "_" + b.id + '" class="mb8">';
        d += getSingleOpenAnswerInnerHtml(e, b);
        d += "</div>"
    }
    return d
}
function getSingleOpenAnswerInnerHtml(d, b) {
    var c = "";
    c += '<label class=" mr5 fl d-tit">' + b.name + "</label>";
    c += '<input type="text" id="q_format_' + d.id + "_" + b.id + '" class="field text ' + (d.format == 1 ? "small": "medium") + '" value="" maxlength="255" tabindex="1">';
    return c
}
function getBlankHtml(b) {
    var a = "";
    a += "<section>";
    a += '<div id="q_name_' + b.id + '">' + replaceQuestion(b.descriptionview) + "</div>";
    a += getImgHtml(b);
    a += '<div id="q_instruction_' + b.id + '">' + replaceQuestion(b.instruction) + "</div>";
    a += "</section>";
    return a
}
function getScoreHtml(c) {
    var b = "";
    b += getNameForLabelHtml(c);
    b += '<div class="star">';
    for (var a = 0; a < c.answers.length; a++) {
        b += '<img width="24" height="24" src="' + imagePath + 'star.png">'
    }
    b += "</div>";
    return b
}
function getColorHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += '<div class="th-key">';
    a += '<div class="th-colour" id="q_color_' + b.id + '">';
    a += getColorInnerHtml(b);
    a += "</div>";
    a += "</div>";
    return a
}
function getColorInnerHtml(e) {
    var d = "";
    if (e.answers != null) {
        for (var c = 0; c < e.answers.length; c++) {
            var b = e.answers[c];
            if (b.remark == "assortment") {
                d += '<div title="' + b.name + '"><div class="th-img"><a style="background: url(' + imagePath + 'color-bg.gif) no-repeat 0 0px;"></a></div></div>'
            } else {
                if (b.remark == "transparent") {
                    d += '<div title="' + b.name + '"><div class="th-img"><a style="background: url(' + imagePath + 'color-bg.gif) no-repeat 0 -24px;"></a></div></div>'
                } else {
                    d += '<div title="' + b.name + '"><div class="th-img"><a style="background: ' + b.remark + '"></a></div></div>'
                }
            }
        }
    }
    return d
}
function getAgeHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<span class="w40"> <input type="text" id="Field" name="Field" class="field text small" value="" tabindex="3" readonly="readonly">	<label>年</label></span>';
    a += '<span class="w40">	<input type="text" id="Field" name="Field" class="field text small" value="" tabindex="3" readonly="readonly">	<label for="Field">月</label></span>';
    a += '<span id="cal114"> <img id="pick114" class="datepicker" src="' + imagePath + 'calendar.png" alt="Pick a date."> </span>';
    a += "</div>";
    return a
}
function getSexHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<label><input type="radio" name="RadioGroup1" value="男" id="RadioGroup1_0" /><img src="' + imagePath + 'man.gif" width="24" height="24" /></label>';
    a += '<label><input type="radio" name="RadioGroup1" value="女" id="RadioGroup1_1" /><img src="' + imagePath + 'woman.gif" width="24" height="24" /></label>';
    a += "";
    a += "</div>";
    return a
}
function getCityHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div> ";
    a += '<span class="city">';
    a += '<select class="field select medium" id="province" name="province">	<option>请选择省份</option></select>';
    a += '<select class="field select medium" id="city" name="city">	<option>请选择城市</option></select>';
    a += '<label for="Field">省份/城市</label>';
    a += "</span>";
    a += " </div>";
    return a
}
function getEmailHtml(a) {
    return getNormalHtml(a)
}
function getWebsiteHtml(a) {
    return getNormalHtml(a)
}
function getNormalHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<input type="text" id="q_predefine_' + b.id + '"  style="width:300px;height:16px;padding-top:2px" class="field text large" value="' + ((b.predefine == undefined || b.predefine == null) ? "": b.predefine) + '" size="14" tabindex="2" >';
    a += "</div>";
    return a
}
function getNameHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<input type="text" id="q_content_' + b.id + '" tabindex="2" size="14" value="" class="field text ln">';
    a += "</div>";
    return a
}
function getDateHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += "";
    a += '<div class="mt8" id="q_date_' + b.id + '"> ';
    a += getDateInnerHtml(b);
    a += "</div>";
    a += "</div>";
    return a
}
function getDateInnerHtml(c) {
    var b = "";
    var a = ((c.predefine == undefined || c.predefine == null) ? "": c.predefine).split(DATE_SPLIT);
    b += '<span class="w40"><input type="text" readonly="readonly" tabindex="3" value="' + (c.predefine == "" ? "": a[0]) + '" class="field text small" id="q_year_' + c.id + '" />	<label>年</label></span>';
    b += '<span class="w40"><input type="text" readonly="readonly" tabindex="3" value="' + (c.predefine == "" ? "": a[1]) + '" class="field text small" id="q_month_' + c.id + '" />	<label>月</label></span>';
    if (c.format == 7) {} else {
        b += '<span class="w40"><input type="text" readonly="readonly" tabindex="3" value="' + (c.predefine == "" ? "": a[2]) + '" class="field text small" id="q_day_' + c.id + '" /><label>日</label></span>'
    }
    b += '<span id="cal114"> <img id="pick114" class="datepicker" src="' + imagePath + 'calendar.png" alt="Pick a date."> </span>';
    return b
}
function getTimeHtml(c) {
    var b = "";
    b += getNameForLabelHtml(c);
    var a = ((c.predefine == undefined || c.predefine == null) ? "": c.predefine).split(TIME_SPLIT);
    b += "<div>";
    b += '<div class="mt8"> ';
    b += '<span class="w40"><input type="text" readonly="readonly" tabindex="3" value="' + (c.predefine == "" ? "": a[0]) + '" class="field text small" id="q_hour_' + c.id + '" /><label>时</label></span> ';
    b += '<span class="w40"><input type="text" readonly="readonly" tabindex="3" value="' + (c.predefine == "" ? "": a[1]) + '" class="field text small" id="q_minute_' + c.id + '" /><label>分</label></span>';
    b += '<span class="w40"><input type="text" readonly="readonly" tabindex="3" value="' + (c.predefine == "" ? "": a[2]) + '" class="field text small" id="q_second_' + c.id + '" /><label>秒</label></span> ';
    b += '<span id="cal114"> <img id="pick114" class="datepicker" src="' + imagePath + 'time_16.gif" alt="Pick a date."> </span>';
    b += "</div>";
    b += "</div>";
    return b
}
function getPriceHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<p><input type="text" tabindex="2" size="14" value="" class="field" >元</p>';
    a += "</div>";
    return a
}
function getRadioSelectHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += '<div id="q_phone_' + b.id + '">';
    a += getPhoneInnerHtml(b);
    a += "</div>";
    return a
}
function getPhoneHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += '<div id="q_phone_' + b.id + '">';
    a += getPhoneInnerHtml(b);
    a += "</div>";
    return a
}
function getPhoneInnerHtml(c) {
    var b = "";
    if (c.format == 4) {
        var a = ((c.predefine == undefined || c.predefine == null) ? "": c.predefine).split(PHONE_SPLIT);
        b += '<div class="mt8">';
        b += '<span class="w40"><input type="text" id="q_phone1_' + c.id + '" class="field text small" value="' + a[0] + '" tabindex="3" readonly="readonly" ><label for="q_phone1_' + c.id + '">国家</label></span>';
        b += ' <span class="w40"><input type="text" id="q_phone2_' + c.id + '" class="field text small" value="' + (a[1] == undefined ? "": a[1]) + '" tabindex="3" readonly="readonly" ><label for="q_phone2_' + c.id + '">区号</label></span>';
        b += ' <span class="w120"><input type="text" id="q_phone3_' + c.id + '" class="field text medium" value="' + (a[2] == undefined ? "": a[2]) + '" tabindex="3" readonly="readonly" ><label for="q_phone3_' + c.id + '">号码</label></span>';
        b += "";
        b += "</div>"
    } else {
        b += '<p><input type="text" id="q_phone1_' + c.id + '" class="field text addr" value="' + c.predefine + '" tabindex="3" readonly="readonly" ></p>'
    }
    return b
}
function getAddressHtml(b) {
    var a = "";
    a += getNameForLabelHtml(b);
    a += "<div>";
    a += '<span class="city">';
    a += '<select class="field select medium" id="province" name="province">	<option>请选择省份</option></select>';
    a += '<select class="field select medium" id="city" name="city">	<option>请选择城市</option></select>';
    a += ' <label for="Field">省份/城市</label>';
    a += "</span>";
    a += '<span class="full addr1">';
    a += '<input type="text" id="Field" name="Field" class="field text addr" value="" tabindex="1" >';
    a += '<label for="Field">详细地址</label>';
    a += "</span>";
    a += '<span class="zip">';
    a += '<input type="text" id="Field" name="Field" class="field text addr" value="" tabindex="3" >';
    a += '<label for="Field">邮编</label>';
    a += "</span>";
    a += "";
    a += "";
    a += "</div>";
    return a
}
function checkFirstAge(d) {
    var f = {};
    if (survey.comment != undefined && survey.comment != "") {
        f = $.evalJSON(survey.comment)
    }
    if (userAge != "1" && f.edit_fisrtAgeQuestion != "1") {
        var a = getFirstAgeTips(d);
        var c = 0;
        var b = 0;
        var e = "#question_" + d;
        c = $(e).offset().left - 150;
        b = $(e).offset().top - 5;
        $("#overlay").after(a);
        $("#overlay").css("height", $(document).height()).show();
        $(".age-problem-tips").css({
            left: c + "px",
            top: b + "px"
        })
    }
}
function getFirstAgeTips(b) {
    var a = $("<div>").addClass("age-problem-tips");
    a.append('<div style="position:absolute; right:170px; top:90px"><a title="关闭" href="javascript:void(0);" onclick="closeAgeTips();return false;"><img height="31" width="29" alt="关闭" src="' + imagePath + 'close.png"></a></div>');
    a.append('<div class="age-problem-tips-txt">当使用系统年龄题，被访者答题时输入的出生年月，调研宝系统后台会在数据分析时采用年龄段分布的统计方法，更科学合理的表现数据。</div>');
    a.append($("<div>").addClass("mt10").append('<div class="fl gray9"><input type="checkbox" checked="checked" value="" id="agequestion" /> <label for="agequestion">不再提示</label></div>').append('<div class="fr"><a title="我知道了" href="javascript:void(0);" onclick="iKnowAgeTips();return false;"><img height="27" width="74" alt="我知道了" src="' + imagePath + 'i-see-btn.gif" /></a></div>').append('<div class="clear"></div>'));
    return a
}
function closeAgeTips() {
    recordeAgeTips(2)
}
function iKnowAgeTips() {
    if ($("#agequestion").is(":checked")) {
        recordeAgeTips(1)
    } else {
        recordeAgeTips(2)
    }
}
function closeAgeTipsDiv() {
    $("#overlay").hide();
    $(".age-problem-tips").remove()
}
function recordeAgeTips(a) {
    closeAgeTipsDiv();
    if (a == 1) {
        userAge = "1"
    } else {
        var b = {};
        if (survey.comment != undefined && survey.comment != "") {
            b = $.evalJSON(survey.comment)
        }
        b.edit_fisrtAgeQuestion = "1";
        survey.comment = $.toJSON(b)
    }
    ajaxPost(ctx + "/json/survey/recordeTips", {
        sid: SURVEYID,
        tagid: 2,
        flag: a
    },
    function(c) {})
}
function checkFirstOut() {
    if (surveyOut15 != "1") {
        tips("提高样本完成度，建议您将问卷控制在15个问题以内", "success", null, null);
        recordeOutTips()
    }
}
function recordeOutTips() {
    surveyOut15 = "1";
    var a = {};
    if (survey.comment != undefined && survey.comment != "") {
        a = $.evalJSON(survey.comment)
    }
    a.edit_fisrtOut15 = "1";
    survey.comment = $.toJSON(a);
    ajaxPost(ctx + "/json/survey/recordeTips", {
        sid: SURVEYID,
        tagid: 3,
        flag: 2
    },
    function(b) {})
};